﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/CommonPages/MasterPageBackEnd.master" AutoEventWireup="true" CodeFile="StudentsHome.aspx.cs" Inherits="Pages_StudentPages_Students" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="block">
                            <h2>Pesonal Info</h2>
                            <ul>
                                <li onclick="displayBlockStudent('StudentChangePass')"><i class="fa fa-angle-right"></i>Change Password</li>
                                <li onclick="displayBlockStudent('StudentUpdateInfo')"><i class="fa fa-angle-right"></i>Update Info</li>
                            </ul>
                        </div>
                        <div class="block">
                            <h2>PAGE</h2>
                            
                            <ul id="content-box-tabs">
                                <li><i class="fa fa-angle-right"></i>Competition
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStudent('StudentViewCompetition')"><i class="fa fa-angle-right"></i>View going competition</li>                                        
                                    </ul>
                                </li>
                                <li><i class="fa fa-angle-right"></i>Design
                                    <ul class="managerOption">                                        
                                        <li onclick="displayBlockStudent('StudentViewDesign')"><i class="fa fa-angle-right"></i>View design</li>                            
                                    </ul>
                                </li>
                                <li><i class="fa fa-angle-right"></i>Awards
                                    <ul class="managerOption">
                                        <li onclick="displayBlockStudent('')"><i class="fa fa-angle-right"></i>View awards</li>                                        
                                    </ul>
                                </li>                                
                            </ul>
                        </div>                   

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="StudentChangePass">
                <div class="updateStudent">
                    <h4>Change Password</h4>
                    <asp:Label ID="lblWarningChangePass" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" Font-Strikeout="False" Font-Underline="False" ForeColor="Red"></asp:Label>
                    <table class="addTable">
                        <tr>
                            <td>
                                <asp:Label ID="lblCurrentPass" runat="server" Text="Current Password :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCurrentPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblNewPass" runat="server" Text="New Password :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtNewPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblConfirmPass" runat="server" Text="Confirm Password :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtConfirmPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:Button ID="btnChangePass" runat="server" Text="Change Password"
                                    ClientIDMode="Static" OnClick="btnChangePass_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="StudentUpdateInfo">
                <div class="addTable">
                    <h4>Update Info</h4>
                    <asp:Label ID="lblWarningUpdateInfo" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label>
                    <table class="tableStudent">

                        <tr>
                            <td>
                                <asp:Label ID="lblFullNameUpdate" runat="server" Text="Full name :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtFullNameUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblAddressUpdate" runat="server" Text="Address :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddressUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblEmailUpdate" runat="server" Text="Email :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtEmailUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblPhoneUpdate" runat="server" Text="Phone :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtPhoneUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblMajorUpdate" runat="server" Text="Major :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtMajorUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblClassUpdate" runat="server" Text="Class :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtClassUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:Button ID="btnUpdate" runat="server" Text="Update"
                                    ClientIDMode="Static" OnClick="btnUpdate_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <!-- competitions -->
            <!-- view competitions -->
            <div id="StudentViewCompetition">
                <h4>Competition List</h4>
                <asp:Label ID="Label3" runat="server" Text="Name of Competition: "></asp:Label>
                <asp:TextBox ID="txtSeachCompetition" runat="server"></asp:TextBox>
                <asp:Button ID="btnSeachCompetition" runat="server" Text="Search"
                    OnClick="btnSeachCompetition_Click" />
                <asp:Button ID="btnDisplayAllCompetition" runat="server"
                    Text="Display All Competition" OnClick="btnDisplayAllCompetition_Click" />
                <asp:GridView ID="grvCompetition" runat="server" AutoGenerateColumns="False" 
                                AllowPaging="True" DataKeyNames="comId" AllowSorting="True" 
                                PageSize="5" ForeColor="#FF9933" 
                                onrowdatabound="grvCompetition_RowDataBound" CssClass="mGrid" 
                    PagerStyle-CssClass="pgr">
                     <Columns>
                         <asp:BoundField DataField="comId" HeaderText="Id">
                         </asp:BoundField>
                         <asp:BoundField DataField="name" HeaderText="Name" >
                         </asp:BoundField>
                         <asp:BoundField DataField="firstPrize" HeaderText="First Prize" >
                         </asp:BoundField>
                         <asp:BoundField DataField="secondPrize" HeaderText="Second Prize" />
                         <asp:BoundField DataField="thirdPrize" HeaderText="Third Prize" />
                         <asp:BoundField DataField="postDate" HeaderText="Post Date" 
                                        DataFormatString="{0:d}" >
                         </asp:BoundField>
                         <asp:BoundField DataField="startDate" HeaderText="Start Date" 
                                        DataFormatString="{0:d}" >
                         </asp:BoundField>
                         <asp:BoundField DataField="endDate" HeaderText="End Date" 
                                        DataFormatString="{0:d}" >
                         </asp:BoundField>
                         <asp:BoundField DataField="description" HeaderText="Description" >
                         </asp:BoundField>
                         <asp:BoundField DataField="quotation" HeaderText="Quotation" >
                         </asp:BoundField>
                     </Columns>            
                     <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>
            <!--design-->
            <!--view design-->
            <div id="StudentViewDesign">
                <h4>Design</h4>
                <table>
                    <tr>
                        <td>
                            <asp:Button ID="Button2" runat="server" Text="Display All"
                                OnClick="Button2_Click" /></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text="Name of Competition: "></asp:Label></td>
                        <td>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="Search Competition"
                                OnClick="Button1_Click" /></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Name of Design: "></asp:Label></td>
                        <td>
                            <asp:TextBox ID="txtSearchDesign" runat="server"></asp:TextBox></td>
                        <td>
                            <asp:Button ID="btnSearchDesign" runat="server" Text="Search Design"
                                Width="172px" OnClick="btnSearchDesign_Click" /></td>
                    </tr>
                </table>
                <asp:GridView ID="grvDesign" runat="server"
                    AllowSorting="True" AutoGenerateColumns="False"
                    PageSize="5" OnRowDataBound="grvDesign_RowDataBound" CssClass="mGrid" 
                    PagerStyle-CssClass="pgr" AllowPaging="True">
                    <Columns>
                        <asp:BoundField DataField="designId" HeaderText="Id">
                        </asp:BoundField>
                        <asp:BoundField DataField="name" HeaderText="Name">
                        </asp:BoundField>
                        <asp:BoundField DataField="postDate" HeaderText="Post Date">
                        </asp:BoundField>
                        <asp:BoundField DataField="comName" HeaderText="Competition">
                        </asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

